<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

  <head>
    <base href="<%=basePath%>" />
    
    <title>添加部门</title>
    
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link rel="stylesheet" href="css/style.css" type="text/css"></link>
	<link rel="stylesheet" href="css/style_.css" type="text/css"></link>
	


<script type="text/javascript">	
function validate(){
	alert("该部门现已存在");
	location.href="AddDepartment.jsp";
}
</script>
</head>
 <s:if test="listDepartments.size!=0">
	<body onload="validate()"></body>
</s:if>
<s:else>
<body>
   <div class="top">
  		<img src="images/main_28.gif"/>&nbsp;&nbsp;添加部门
  	</div>
<center>
  <br />
  <form name="form1" method="post" action="addDepartment">
    <table width="95%" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15%" height="30" class="td_form01"> 部门名称：</td>
        <td class="td_form02" align="left">
          &nbsp;&nbsp;&nbsp;<input name="department.departmentName" type="text" maxlength="10" class="input" size=100 />          
        <span style="width: 10%"><s:property value="message" /></span>
        </td>
      </tr>
      <tr>
        <td width="15%" height="30" class="td_form01"> 部门邮箱：</td>
        <td class="td_form02" align="left">
        &nbsp;&nbsp;&nbsp;<input name="department.departmentEmail" type="text" class="input" size=100 /></td>
      </tr>
      <tr>
        <td width="15%" height="30" class="td_form01"> 部门描述：</td>
        <td class="td_form02" align="left">
        	&nbsp;&nbsp;&nbsp;<textarea rows="8" name="department.departmentDesc" style="width: 45%"></textarea>
        </td>
      </tr>
    </table>
    <br />
    <table width="95%"  border="0" cellspacing="0" cellpadding="0">
      	<tr>
       		<td align="center" class="td_page"><div>
            	<input type="submit" class="buttonface02" value="  添加  " />
&nbsp;
        		<input name="Submit" type="reset" class="buttonface02" value="  重置  " />
        	</div></td>
      	</tr>
    </table>
  </form>
</center>
</body>
</s:else>
</html>
